trigger trg_consolidated on Parent__c (before insert, after insert,
                                       before update, after update,
                                       before delete, after delete,
                                       after undelete) {

        
        List<Log__c> logList = new List<Log__c>();
        
        if(Trigger.isInsert){
            List<Parent__c> listOfRecords = Trigger.New;
            if(Trigger.isBefore){
                for(Parent__c p :listOfRecords ){
                    Log__c log = new Log__c();
                    log.Log_Info__c = '|' + Trigger.size + ' | Log record :: Before Insert Operation for ' + p.PField1__c + ' ' + p.pField2__c;  
                    logList.add(log);
                }    
            } else if(Trigger.isAfter){
                for(Parent__c p :listOfRecords ){
                    Log__c log = new Log__c();
                    log.Log_Info__c = '|' + Trigger.size + ' | Log record :: After Insert Operation for ' + p.Id + ' ' + p.Name;  
                    logList.add(log);
                }    
            }
        } else if(Trigger.isUpdate){
            List<Parent__c> listOfRecords = Trigger.New;
            if(Trigger.isBefore){
                for(Parent__c p :listOfRecords ){
                    Log__c log = new Log__c();
                    log.Log_Info__c = '|' + Trigger.size + ' | Log record :: Before Update Operation for ' + p.PField1__c + ' ' + p.pField2__c;  
                    logList.add(log); 
                }    
            } else if(Trigger.isAfter){
                for(Parent__c p :listOfRecords ){
                    Log__c log = new Log__c();
                    log.Log_Info__c = '|' + Trigger.size + ' | Log record :: After Update Operation for ' + p.Id + ' ' + p.Name;  
                    logList.add(log);
                }    
            }
        } else if(Trigger.isDelete){
            if(Trigger.isBefore){
            
            } else if(Trigger.isAfter){
            
            }            
        } else if(Trigger.isUndelete){
            
        } else {
            
        } 
        
        insert logList; 
}